<?php
/* -------------------------------------------------------------------------------------
* 	ID:						$Id: add_pic.php 11 2013-09-21 11:43:11Z phone.mueller@googlemail.com $
* 	Letzter Stand:			$Revision: 11 $
* 	zuletzt geaendert von:	$Author: siekiera $
* 	Datum:					$Date: 2013-09-21 11:43:11 +0000 (Sat, 21 Sep 2013) $
*
* 	SEO:mercari by Siekiera Media
* 	http://www.seo-mercari.de
*
* 	Copyright © since 2011 SEO:mercari
* --------------------------------------------------------------------------------------
* 	based on:
* 	© 2000-2001 The Exchange Project  (earlier name of osCommerce)
* 	© 2002-2003 osCommerce - www.oscommerce.com
* 	© 2003     nextcommerce - www.nextcommerce.org
* 	© 2005     xt:Commerce - www.xt-commerce.com
*
* 	Released under the GNU General Public License
* ----------------------------------------------------------------------------------- */

defined('_VALID_XTC') or die('Direct Access to this location is not allowed.');

$sliders = $db->db_query("SELECT slider_id FROM ".TABLE_SLIDER." ORDER BY slider_id ");

if($sliders->_numOfRows < 1)
	echo '<em>Sie müssen erst einen Slider erstellen um Grafiken hochladen zu können.</em>';

else {
	echo draw_form('slider', 'slider.php', 'save=new_pic&'.getMenuID('slider'), 'POST', 'enctype="multipart/form-data" id="slider"'); ?>
		<table width="100%" cellpadding="5">
			<?php
			$languages = get_languages();
			foreach($languages AS $lang) { $i++; 
				if($i > 1)
					echo '<tr><td colspan="2" style="border-top: 1px solid #ccc">&nbsp;</td></tr>';
				?>
				<tr>
					<td colspan="2">
						<?php echo '<img src="../lang/'.$lang['directory'].'/'.$lang['image'].'" alt="'.$lang['name'].'" />'; ?> 
						<b><?php echo $lang['name']; ?></b>
					</td>
				</tr>
				<tr>
					<td>Grafik:</td>
					<td>
						<?php
							echo draw_file_field('slider_pic_'.$lang['id']).'<br />';
						?>
					</td>
				</tr>
				<tr>
					<td>Link:<br /><em class="fs85">optional</em></td>
					<td>
						<?php echo draw_input_field('slider_link_'.$lang['id'], '', 'style="width:98%"'); ?>
					</td>
				</tr>
				<tr>
					<td valign="top">Beschreibung:<br /><em class="fs85">optional</em></td>
					<td>
						<textarea name="slider_description_<?php echo $lang['id'] ?>"></textarea>
					</td>
				</tr>
			<?php } ?>
		</table>
		<?php echo draw_hidden_field('slider_id', (int)$_GET['slider_id']); ?>
	</form>
<?php } ?>